libobs_simple\sources\linux\sources/xcomposite_input.rs
1use libobs_wrapper::sources::{ObsSourceBuilder, ObsSourceRef};
2
3use crate::sources::macro_helper::define_object_manager;
4
5define_object_manager!(
6 #[derive(Debug)]
7 /// A source to capture X11 windows using XComposite.
8 ///
9 /// This source provides window capture functionality on Linux systems running X11
10 /// using the XComposite extension. It can capture individual windows with their
11 /// transparency and effects intact.
12 struct XCompositeInputSource("xcomposite_input") for ObsSourceRef {
13 /// Window to capture (window ID as string)
14 #[obs_property(type_t = "string")]
15 capture_window: String,
16
17 /// Crop from top (in pixels)
18 #[obs_property(type_t = "int")]
19 cut_top: i64,
20
21 /// Crop from left (in pixels)
22 #[obs_property(type_t = "int")]
23 cut_left: i64,
24
25 /// Crop from right (in pixels)
26 #[obs_property(type_t = "int")]
27 cut_right: i64,
28
29 /// Crop from bottom (in pixels)
30 #[obs_property(type_t = "int")]
31 cut_bot: i64,
32
33 /// Whether to show the cursor in the capture
34 #[obs_property(type_t = "bool")]
35 show_cursor: bool,
36
37 /// Include window border/decorations
38 #[obs_property(type_t = "bool")]
39 include_border: bool,
40
41 /// Exclude alpha channel (disable transparency)
42 #[obs_property(type_t = "bool")]
43 exclude_alpha: bool,
44 }
45);
46
47impl ObsSourceBuilder for XCompositeInputSourceBuilder {}